<%@ page language="java" contentType="text/html; charset=utf-8" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.general.Util" %>
<%
    JSONObject jsonData = new JSONObject();
    String requestid = Util.null2String( request.getParameter( "requestid" ) );
    String cl = Util.null2String( request.getParameter( "cl" ) );
    String yckssj = Util.null2String( request.getParameter( "yckssj" ) );
    String ycjssj = Util.null2String( request.getParameter( "ycjssj" ) );
    int count = 0;
    try {
        rs.executeQuery( "select count(id) from formtable_main_207 where requestid !='"+requestid+"' " +
                "and cl='"+cl+"' and (('"+yckssj+"' between yckssj and ycjssj) " +
                "or ('"+ycjssj+"' between yckssj and ycjssj))");
        rs.next();
        count = Util.getIntValue( rs.getString(1) );
    } catch (Exception e) {
        e.printStackTrace();
    }
    jsonData.put( "count", count );
    out.print( jsonData.toJSONString() );
%>
